from PyQt5 import QtGui, QtCore
from PyQt5.QtCore import QPropertyAnimation, QEasingCurve

class TitleHandle():
    def showMin(self):
        self.showMinimized()

    def showRestoredWindow(self):
        # self.showMaximized()
        if self.isMaximized():
            self.showNormal()
            # self.maxButton.setMaxState(False)

            icon = QtGui.QIcon()
            icon.addPixmap(QtGui.QPixmap(":/icons/images/icon/maximize.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
            self.MaximizeButton.setIcon(icon)
            self.MaximizeButton.setIconSize(QtCore.QSize(24, 24))
        else:
            self.showMaximized()
            # self.maxButton.setMaxState(True)

            icon = QtGui.QIcon()
            icon.addPixmap(QtGui.QPixmap(":/icons/images/icon/nomal.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
            self.MaximizeButton.setIcon(icon)
            self.MaximizeButton.setIconSize(QtCore.QSize(24, 24))